   "ui";
   //打开数据库
   let db = sqlite.open("./data.db", {
       version: 1
   });
   //皮肤
   skinCollection = db.rawQuery('SELECT * FROM SKIN', null).all();
   exechead = "ui.layout(\
    <scroll bg='{{backg}}'>\
        <vertical bg='#707070' padding='16'>\
            <text text='皮肤：' textColor='black' textSize='16sp' marginTop='16' />";
   exectail = "        </vertical>\
 </scroll>\
);";
   execbody = "";
   execuilsnr = "";
   for (n = 0; n < skinCollection.length; n++) {
       execuilsnr += "ui." + skinCollection[n]['skinname'] + ".on('click',()=>{\
        let db = sqlite.open('./data.db', {\
                    version: 1});\
               db.update('THEMESETTINGS', {\
            skinpath:'" + skinCollection[n]['skinpath'] + "'}, 'id = ?', ['1']);\
            toast('" + skinCollection[n]['skinname'] + "皮肤设置成功');\
            db.close();\
            });";
       if (n % 4 == 0) {
           execbody += "            <horizontal>\
                <vertical id='" + skinCollection[n]['skinname'] + "' w='80' h='120' clickable='true' bg='?android:attr/selectableItemBackground' alpha='1' >\
                    <text text='" + skinCollection[n]['skinname'] + "' textColor='black' textSize='16sp' marginTop='16' gravity='center' />\
                    <img src='" + skinCollection[n]['skinpath'] + "'\
                    borderWidth='2dp' borderColor='#202020' />\
                </vertical>";
       }
       if ((n + 1) % 4 == 0) {
           execbody += "                <vertical id='" + skinCollection[n]['skinname'] + "' w='80' h='120' clickable='true' bg='?android:attr/selectableItemBackground' alpha='1' >\
                    <text text='" + skinCollection[n]['skinname'] + "' textColor='black' textSize='16sp' marginTop='16' gravity='center' />\
                    <img src='" + skinCollection[n]['skinpath'] + "'\
                    borderWidth='2dp' borderColor='#202020' />\
                </vertical>\
                 </horizontal>";
       } else if (n + 1 == skinCollection.length) {
           execbody += "</horizontal>";
       }
       if (n % 4 > 0 && n % 4 < 3) {
           execbody += "                <vertical id='" + skinCollection[n]['skinname'] + "' w='80' h='120' clickable='true' bg='?android:attr/selectableItemBackground' alpha='1' >\
                    <text text='" + skinCollection[n]['skinname'] + "' textColor='black' textSize='16sp' marginTop='16' gravity='center' />\
                    <img src='" + skinCollection[n]['skinpath'] + "'\
                    borderWidth='2dp' borderColor='#202020' />\
                </vertical>";
       }
   }
   //名片卡
   cardCollection = db.rawQuery('SELECT * FROM bussinesscard', null).all();
   execcardhead = "                <text text='名片卡：' textColor='black' textSize='16sp' marginTop='16' />\
                <horizontal>"
   execcardbody = ""
   execcardtail = "</horizontal>"
   for (n = 0; n < cardCollection.length; n++) {
       //监听控件点击动作，数据库update，把设置表里面的数据名片卡的路径改为从名片卡表里面查出来的对应图片路径
       execuilsnr += "ui." + cardCollection[n]['bussinesscardname'] + ".on('click', () => {\
        db.update('THEMESETTINGS', {\
            bussinesscardpath: '" + cardCollection[n]['bussinesscardpath'] + "'\
        }, 'id = ?', ['1']);\
        toast('设置成功!')\
    });"
       execcardbody += "                    <vertical id='" + cardCollection[n]['bussinesscardname'] + "' w='80' h='80' clickable='true' bg='?android:attr/selectableItemBackground'>\
                        <text text='" + cardCollection[n]['bussinesscardname'] + "' textColor='black' textSize='16sp' marginTop='16' gravity='center' />\
                        <img src='" + cardCollection[n]['bussinesscardpath'] + "' circle='true'\
                        borderWidth='2dp' borderColor='#202020' />\
                    </vertical>"
   }
   //颜色盘
   colorname = ["纯黑", "骚粉", "原谅", "真爱", "基佬", "残阳", "樱花", "橙子", "月光", "淡然", "咖啡", "雨后"]
   colorcode = ["#000000", "#FFB6C1", "#3CB371", "#00BFFF", "#9400D3", "#FF0000", "#feeeed", "#ff6600", "#ffff00", "#ccffff", "#cc6600", "#c0ffee"]
   colorbody = "<horizontal>"
   for (n in colorname) {
       execuilsnr += "ui." + colorname[n] + ".on('click', () => {\
        color_storage.put('color','" + colorcode[n] + "');\
        toast('颜色修改成功')\
    });"
       if (n % 6 == 0 && n != 0 && n != colorname.length - 1) {
           colorbody += "            </horizontal>\
                                <horizontal>\
                                 <vertical id='" + colorname[n] + "' w='50' h='90' clickable='true' bg='?android:attr/selectableItemBackground'>\
                                        <text text='" + colorname[n] + "' textColor='#FFFFFF' textSize='16sp' marginTop='16' gravity='center' />\
                                        <text w='50' h='50' bg='" + colorcode[n] + "' />\
                                    </vertical>"
       } else if (n == colorname.length - 1) {
           colorbody += "          <vertical id='" + colorname[n] + "' w='50' h='90' clickable='true' bg='?android:attr/selectableItemBackground'>\
                                        <text text='" + colorname[n] + "' textColor='#FFFFFF' textSize='16sp' marginTop='16' gravity='center' />\
                                        <text w='50' h='50' bg='" + colorcode[n] + "' />\
                                    </vertical>\
                                   </horizontal>\
                                 <input id='selfcolor' textStyle='bold' text='请输入自定义16进制颜色码(长按清除文本)' textColor='#FFFFFF' />\
                                <horizontal gravity='center'>\
                                    <button text='提交颜色码' id='commitcolor' backgroundTint='#00000000' textColor='#FFFFFF' />\
                                    <button text='查看颜色码' id='viewcolor' backgroundTint='#00000000' textColor='#FFFFFF' />\
                                    <button id='backbtn' text='返回Gyro' backgroundTint='#00000000' />\
                                </horizontal>"
       } else {
           colorbody += "                 <vertical id='" + colorname[n] + "' w='50' h='90' clickable='true' bg='?android:attr/selectableItemBackground'>\
                                        <text text='" + colorname[n] + "' textColor='#FFFFFF' textSize='16sp' marginTop='16' gravity='center' />\
                                        <text w='50' h='50' bg='" + colorcode[n] + "' />\
                                    </vertical>"
       }
   }
   execuilsnr += "ui.selfcolor.on('long_click', () => {\
        ui.selfcolor.setText('#');\
    });\
    ui.commitcolor.on('click', () => {\
        color_storage.put('color', ui.selfcolor.getText().toString());\
    });\
    ui.viewcolor.on('click', () => {\
        i = app.intent({\
            action: 'VIEW',\
            data: 'https://www.cnblogs.com/planetwithpig/p/11663209.html'\
        });\
        app.startActivity(i);\
    });\
    ui.backbtn.on('click', () => {\
        backg = db.rawQuery('SELECT * FROM THEMESETTINGS where id = ?', ['1']).single()['skinpath'];\
        color = color_storage.get('color');\
        bussinesscard = db.rawQuery('SELECT * FROM THEMESETTINGS where id = ?', ['1']).single()['bussinesscardpath'];\
        mainUI()\
    })"
   color_storage = storages.create("color");
   execcard = execcardhead + execcardbody + execcardtail;
   execSkinCode = exechead + execbody + execcard + colorbody + exectail + execuilsnr;
   eval(execSkinCode);